package com.adcc.ags.cgw.configuration;

import com.fasterxml.jackson.annotation.JsonProperty;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.Min;

/**
 * 心跳配置工厂
 */
public class HeartbeatFactory {

    // 心跳发送会话
   @NotEmpty
    private String hbSendTopic;

    // 心跳接收会话
    @NotEmpty
    private String hbRecvTopic;

    // 心跳发送间隔
    @Min(0)
    private long hbSendInterval;

    // 心跳发送超时时间
    @Min(0)
    private long hbSendTimeout;

    // 心跳接收失效时间
    @Min(0)
    private long hbRecvExpiredTime;

    /**
     * 构造函数
     */
    public HeartbeatFactory(){

    }

    @JsonProperty("hbSendTopic")
    public String getHbSendTopic() {
        return hbSendTopic;
    }

    @JsonProperty("hbSendTopic")
    public void setHbSendTopic(String hbSendTopic) {
        this.hbSendTopic = hbSendTopic;
    }

    @JsonProperty("hbRecvTopic")
    public String getHbRecvTopic() {
        return hbRecvTopic;
    }

    @JsonProperty("hbRecvTopic")
    public void setHbRecvTopic(String hbRecvTopic) {
        this.hbRecvTopic = hbRecvTopic;
    }

    @JsonProperty("hbSendInterval")
    public long getHbSendInterval() {
        return hbSendInterval;
    }

    @JsonProperty("hbSendInterval")
    public void setHbSendInterval(long hbSendInterval) {
        this.hbSendInterval = hbSendInterval;
    }

    @JsonProperty("hbSendTimeout")
    public long getHbSendTimeout() {
        return hbSendTimeout;
    }

    @JsonProperty("hbSendTimeout")
    public void setHbSendTimeout(long hbSendTimeout) {
        this.hbSendTimeout = hbSendTimeout;
    }

    @JsonProperty("hbRecvExpiredTime")
    public long getHbRecvExpiredTime() {
        return hbRecvExpiredTime;
    }

    @JsonProperty("hbRecvExpiredTime")
    public void setHbRecvExpiredTime(long hbRecvExpiredTime) {
        this.hbRecvExpiredTime = hbRecvExpiredTime;
    }
}
